package com.rgp.apipassenger.feign;

import com.rgp.internalcommon.dto.UserInfoDto;
import com.rgp.internalcommon.dto.ResponseResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * @author nhp
 * @version 1.0
 * @description TODO
 * @date 2024-04-13 0:14
 */
@FeignClient("service-passenger-user")
public interface ServicePassengerUserClient {

    @GetMapping("/users/{phone}")
    public ResponseResult<UserInfoDto> getPassengerByPhoneNumber(@PathVariable("phone") String passengerPhone);

    @PostMapping("/users")
    public ResponseResult registPassenger(@RequestBody UserInfoDto userInfoDto);
}